var o = require("../../../uv-ui-tools/libs/mixin/mpMixin.js"), n = require("../../../uv-ui-tools/libs/mixin/mixin.js"), t = require("./props.js"), e = require("../../../../common/vendor.js");

require("../../../uv-ui-tools/libs/function/index.js"), require("../../../uv-ui-tools/libs/function/test.js"), 
require("../../../uv-ui-tools/libs/function/digit.js"), require("../../../uv-ui-tools/libs/util/route.js"), 
require("../../../uv-ui-tools/libs/function/debounce.js"), require("../../../uv-ui-tools/libs/function/throttle.js");

var i = {
    name: "uv-modal",
    mixins: [ o.mpMixin, n.mixin, t.props ],
    data: function() {
        return {
            loading: !1
        };
    },
    computed: {
        nvueStyle: function() {
            return {};
        }
    },
    methods: {
        open: function() {
            this.$refs.modalPopup.open(), this.loading && (this.loading = !1);
        },
        close: function() {
            this.$refs.modalPopup.close();
        },
        popupChange: function(o) {
            o.show || this.$emit("close");
        },
        confirmHandler: function() {
            this.loading || this.$emit("confirm"), this.asyncClose ? this.loading = !0 : this.close();
        },
        cancelHandler: function() {
            this.$emit("cancel"), this.close();
        },
        closeLoading: function() {
            var o = this;
            this.$nextTick(function() {
                o.loading = !1;
            });
        }
    }
};

Array || (e.resolveComponent("uv-line") + e.resolveComponent("uv-loading-icon") + e.resolveComponent("uv-popup"))(), 
Math || (function() {
    return "../../../uv-line/components/uv-line/uv-line.js";
} + function() {
    return "../../../uv-loading-icon/components/uv-loading-icon/uv-loading-icon.js";
} + function() {
    return "../../../uv-popup/components/uv-popup/uv-popup.js";
})();

var u = e._export_sfc(i, [ [ "render", function(o, n, t, i, u, r) {
    return e.e({
        a: o.title
    }, o.title ? {
        b: e.t(o.title)
    } : {}, {
        c: e.t(o.content),
        d: e.s({
            textAlign: o.align
        }),
        e: e.s(r.nvueStyle),
        f: e.s(o.$uv.addStyle(o.textStyle)),
        g: (o.title ? 12 : 25) + "px",
        h: o.showConfirmButton || o.showCancelButton
    }, o.showConfirmButton || o.showCancelButton ? e.e({
        i: o.showCancelButton
    }, o.showCancelButton ? {
        j: e.t(o.cancelText),
        k: o.cancelColor,
        l: e.n(o.showCancelButton && !o.showConfirmButton && "uv-modal__button-group__wrapper--only-cancel"),
        m: e.o(function() {
            return r.cancelHandler && r.cancelHandler.apply(r, arguments);
        })
    } : {}, {
        n: o.showConfirmButton && o.showCancelButton
    }, o.showConfirmButton && o.showCancelButton ? {
        o: e.p({
            direction: "column"
        })
    } : {}, {
        p: o.showConfirmButton
    }, o.showConfirmButton ? e.e({
        q: u.loading
    }, u.loading ? {} : {
        r: e.t(o.confirmText),
        s: o.confirmColor
    }, {
        t: e.n(!o.showCancelButton && o.showConfirmButton && "uv-modal__button-group__wrapper--only-confirm"),
        v: e.o(function() {
            return r.confirmHandler && r.confirmHandler.apply(r, arguments);
        })
    }) : {}, {
        w: o.buttonReverse ? "row-reverse" : "row"
    }) : {}, {
        x: o.$uv.addUnit(o.width),
        y: e.sr("modalPopup", "6a64dca2-0"),
        z: e.o(r.popupChange),
        A: e.p({
            mode: "center",
            zoom: o.zoom,
            zIndex: o.zIndex,
            customStyle: {
                borderRadius: "6px",
                overflow: "hidden",
                marginTop: "-".concat(o.$uv.addUnit(o.negativeTop))
            },
            closeOnClickOverlay: o.closeOnClickOverlay,
            safeAreaInsetBottom: !1,
            duration: 400
        })
    });
} ], [ "__scopeId", "data-v-6a64dca2" ] ]);

wx.createComponent(u);